﻿using B.S.BasicData.Domains;
using B.S.BasicData.ErrorCode;
using Microsoft.EntityFrameworkCore;
using System.Diagnostics.Contracts;

namespace B.S.BasicData.Infrastructures
{
    /// <summary>
    /// 上下文
    /// </summary>
    public class MyDbContext : DbContext
    {
        public MyDbContext(DbContextOptions options) : base(options)
        {
        }
        /// <summary>
        /// 用户表
        /// </summary>
        public DbSet<UserInfos> UserInfos { get; set; }
        /// <summary>
        /// 角色表
        /// </summary>
        public DbSet<Role> Roles { get; set; }
        /// <summary>
        /// 角色用户表
        /// </summary>
        public DbSet<RoleUser> RoleUsers { get; set; }
        /// <summary>
        /// 权限表
        /// </summary>
        public DbSet<Permissons> Permissons { get; set; }
        /// <summary>
        /// 角色权限表
        /// </summary>
        public DbSet<RolePermissons> RolePermissons { get; set; }
    }
}
